package com.yan.shopping.dao;

import com.yan.shopping.domain.Product;
import com.yan.shopping.domain.User;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.List;

public class DateProduct {
    public static List<User> userList = new ArrayList<User>();// 保存用户列表的数据源
    public static List<Product> proList = new ArrayList<Product>();// 保存商品列表数据
    public static List<Product> carList = new ArrayList<Product>();// 保存购物车商品列
    public static User currentUser=null;
    static {
        proList.add(new Product("10101", ProName.海尔冰箱, new BigDecimal(3999.9).setScale(2 , RoundingMode.HALF_UP), 50));
        proList.add(new Product("10102", ProName.格力冰箱, new BigDecimal(2888.8).setScale(2 , RoundingMode.HALF_UP), 30));
        proList.add(new Product("10103", ProName.TCL冰箱,  new BigDecimal(1999.8).setScale(2 , RoundingMode.HALF_UP), 100));
        proList.add(new Product("10104", ProName.美的冰箱, new BigDecimal(4999.9).setScale(2 , RoundingMode.HALF_UP), 60));
        proList.add(new Product("10201", ProName.海尔空调,  new BigDecimal(3099.9).setScale(2 , RoundingMode.HALF_UP), 50));
        proList.add(new Product("10202", ProName.格力空调,  new BigDecimal(2808.8).setScale(2 , RoundingMode.HALF_UP), 40));
        proList.add(new Product("10203", ProName.TCL空调,  new BigDecimal(1099.8).setScale(2 , RoundingMode.HALF_UP), 120));
        proList.add(new Product("10204", ProName.美的空调,  new BigDecimal(4909.9).setScale(2 , RoundingMode.HALF_UP), 65));
       // userList.add(new User(new StringBuffer("admin"), new StringBuffer("123456"), new StringBuffer("张三"), 24));
    }
}
